package com.csgc.camera.widget.dialog.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import com.csgc.camera.base.FragmentLazyPagerAdapter
import com.csgc.camera.bean.MaskDataInfo
import com.csgc.camera.bean.MaskItemInfo
import com.csgc.camera.biz.other.fragment.MaskPageFragment

class MaskPageAdapter(val list:List<MaskDataInfo>, fragmentManager: FragmentManager): FragmentLazyPagerAdapter(fragmentManager) {

    override fun getCount(): Int {
        return list.size
    }

    override fun getItem(position: Int): Fragment {
        val tempList = ArrayList<MaskItemInfo>()

        tempList.addAll(list[position].list)
       return MaskPageFragment.getInstance(tempList)
    }
}